@extends("admin_system/public/layout")

@section('content')
    <div class="col-xs-12 top-nav nav">
        <p class="float-left nav-path"><strong>当前位置：</strong>企业管理>>企业列表</p>

        {{--返回按钮--}}
        <button type="button" class="btn btn-default float-right back" aria-label="Left Align">
            <span class="glyphicon glyphicon-arrow-left back" aria-hidden="true"></span>
            <span>返回</span>
        </button>
    </div>


    <div class="content-box col-xs-12 mt20 pb20 pt20">

        <form class="form-inline nav mb10" method="get" action="{{asset('admin_system/company/company_list')}}">
            <div class="form-group">
                <div class="input-group">
                    <div class="input-group-addon">查询</div>
                    <input name="keywords" class="form-control"  placeholder="按公司名称查询" value="{{$keywords}}">
                    {{csrf_field()}}
                </div>
            </div>
            <button type="submit" class="btn btn-primary">搜索</button>
        </form>


        <table class="table table-hover table-bordered">
            <tr>
                <th>编号</th>
                <th>用户名称</th>
                <td>手机号码</td>
                <th>购买产品</th>
                <th>支付金额</th>
                <th>支付时间</th>
                <th>支付来源</th>
                <th>支付备注</th>
                <th>操作</th>
            </tr>

            @foreach($orders as $order)
                <tr>
                    <td width="70">{{$order->id}}</td>
                    <td>{{$order->YourName}}</td>
                    <td>{{$order->UserName}}</td>
                    <td>{{$order->goods_type}}</td>
                    <td>{{$order->pay_money/100}}</td>
                    <td>{{$order->pay_time}}</td>
                    <td>{{$order->pay_source}}</td>
                    <td width="200">{{$order->message}}</td>
                    <td>
                        <a href="{{asset('admin_system/order/refund?orderId='.$order->id)}}" class="btn btn-xs btn-danger" onclick="return confirm('确定退款吗？')">退款</a>
                    </td>
                </tr>
            @endforeach
        </table>


        {!! $orders->appends(['keywords'=>$keywords])->links() !!}

    </div>
@endsection